/**
 * “用户管理”相关接口
 */
import request from '@/utils/request'

export default {
  /** consumer.vue 开始 **/
  getAllUserInfo(params, page, size) {
    const data = params;
    return request({
      url: 'shopUser/allInfo?page='+page+'&size='+size,
      method: 'post',
      data
    })
  },
  updateUserInfo(params){
    let data = params;
    return request({
      url: 'shopUser/data/updateById',
      method: 'post',
      data
    })
  },
  /** consumer.vue 结束 **/
  /** adminList.vue 开始 **/
  getAdminInfo(params, page, size) {
    const data = params;
    return request({
      url: 'sysUser/allInfo?page='+page+'&size='+size,
      method: 'post',
      data
    })
  },
  updateAdminInfo(params){
    let data = params;
    return request({
      url: 'sysUser/data/updateById',
      method: 'post',
      data
    })
  },
  souAdminInfo(params){
    let data = params;
    return request({
      url: 'sysUser/sou',
      method: 'post',
      data
    })
  },
  deleteAdminInfo(params){
    let data = params;
    return request({
      url: 'sysUser/delete',
      method: 'post',
      data
    })
  },
  /** adminList.vue 结束 **/
  /** index.vue 开始 **/
  restPassword(params){
    /** 重置密码或头像 **/
    let data = params;
    return request({
      url: 'sysUser/restInfo',
      method: 'post',
      data
    })
  },
  /** index.vue 结束 **/
}
